#ifndef _NET_DNS_H_
#define _NET_DNS_H_



#define DNS_PROC_RES_ERROR			0
#define DNS_PROC_RES_OK				1
#define DNS_PROC_RES_COMPLETE		100


interface IDnsProc 
{
	//error		0 ip = 192.168.1.1
	//error		1 ip = "" 
	//error		100 dns async end
	std_method(DnsResultIP)(int error, const char* url, const char* ip)	= 0;
	//return 
	//S_OK		coutinue;
	//E_FAIL	break;
};



interface IDns : public IBase
{
	std_method(GetURLtoHost)(	const char* url, const char* lastip,
								const char* name, IDnsProc* proc,
								int* cache,char* ip, int nocache)	= 0;
	std_method(DnsSyncResultIP)(const char* url, IDnsProc* proc)	= 0;

};
_DEFINE_IID(IDns, "{433D47B0-82C8-451A-91FA-382EE0E467D7}");

// {99148517-E9AB-4F72-A2E3-012625A35E95}
_DEFINE_GUID(CLSID_IDns,
	0x99148517, 0xe9ab, 0x4f72, 0xa2, 0xe3, 0x1, 0x26, 0x25, 0xa3, 0x5e, 0x95);

#endif